home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Storage / Bento / TargtHdr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.6 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TargtHdr.h
  3.  
  4.     Contains:    Header for Target Handler for Bento Container Suite
  5.  
  6.     Written by:    Vincent Lo
  7.  
  8.     Copyright:    © 1993-1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <1>     5/27/94    VL        first checked in
  13.  
  14.     To Do:
  15. */
  16.  
  17. /* (use tabs = 2 to view this file correctly) */
  18. /*---------------------------------------------------------------------------*
  19.  |                                                                           |
  20.  |                     <<< TargetContainerHandlers.c >>>                     |
  21.  |                                                                           |
  22.  |        Container Manager Basic Target Container Handlers Interfaces       |
  23.  |                                                                           |
  24.  |                               Ira L. Ruben                                |
  25.  |                                 5/28/92                                   |
  26.  |                                                                           |
  27.  |                    Copyright Apple Computer, Inc. 1992                    |
  28.  |                           All rights reserved.                            |
  29.  |                                                                           |
  30.  *---------------------------------------------------------------------------*
  31.  
  32.  This file contains an the interfaces for of basic container I/O handler's metahandler
  33.  used by the Container Manager when doing updating operations on a target container.  The
  34.  "I/O" defined by this methandler is in terms of Container Manager API calls on a dynamic
  35.  OR real value.
  36.  
  37.  See TargetContainerHandlers.c for complete details.
  38.  
  39.  Note, this header and its corresponding code are NOT to be viewed as example handlers.
  40.  They are not internal to the Container Manager code for portability reasons.  That is 
  41.  because these handlers, like all other handlers may have to be modified as a function of
  42.  a particular hardware installation (for example, TOC and label I/O handlers for machines
  43.  with different byte sizes).
  44. */
  45.  
  46. #ifndef _TARGTHDR_
  47. #define _TARGTHDR_
  48.  
  49. #include "CMAPI.h"
  50.  
  51.                                                                         CM_CFUNCTION
  52.     
  53. CMHandlerAddr CM_FIXEDARGS targetContainerMetahandler(CMType targetType, CMconst_CMGlobalName operationType);
  54.     /*
  55.     Metahandler proc for determining the addresses of the handler operation routines.  The
  56.     API user is expected to register a predefined type, CMTargetHandlersTypeName (defined 
  57.     in CM_API_StdObjIDs.h), with this methandler using CMSetMetaHandler().  The Container
  58.     Manager uses this type to open the target container.  That, in turn, will use this
  59.     metahandler due to the methandler/type association.  The methandler will thus return the
  60.     addresses of the handler routines defined in TargetContainerHandlers.c. 
  61.     */
  62.  
  63. CMRefCon open_Handler(CMRefCon attributes, CMOpenMode mode);
  64. void close_Handler(CMRefCon refCon);
  65. CMSize seek_Handler(CMRefCon refCon, CM_LONG posOff, CMSeekMode mode);
  66. CMSize tell_Handler(CMRefCon refCon);
  67. CMSize read_Handler(CMRefCon refCon, CMPtr buffer, CMSize elementSize, CMCount theCount);
  68. CMSize containerSize_Handler(CMRefCon refCon);
  69. void readLabel_Handler(CMRefCon refCon, CMMagicBytes magicByteSequence,
  70.                                                              CMContainerFlags *flags, CM_USHORT *bufSize,
  71.                                                              CM_USHORT *majorVersion, CM_USHORT *minorVersion,
  72.                                                              CMSize *tocOffset, CMSize *tocSize);
  73. CM_UCHAR *returnContainerName_Handler(CMRefCon refCon);
  74. void extractData_Handler(CMRefCon refCon, CMDataBuffer buffer,
  75.                                                                   CMSize size, CMPrivateData data);
  76. void formatData_Handler(CMRefCon refCon, CMDataBuffer buffer, CMSize size, CMPrivateData data);
  77.  
  78.                                                                     CM_END_CFUNCTION
  79.  
  80. #endif
  81.